package activities.project3.group3.s12cs342;


import tools.Project3.Group3.s12cs342.AsyncGetScore;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;

public class GradesActivity extends Activity{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		// TODO Auto-generated method stub
		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.grades);
		
		Button main = (Button) findViewById(R.id.mainMenu);
		final ListView lv = (ListView) findViewById(R.id.gradelist);
		 Quiz mApplication = ((Quiz)getApplicationContext());
		 lv.setAdapter(new ArrayAdapter<String>(getApplicationContext(),R.layout.list_item, mApplication.getS())); 
		 
		main.setOnClickListener( new OnClickListener(){

			public void onClick(View arg0) {
				Intent i = new Intent(GradesActivity.this, QuizMasterActivity.class);
				startActivity(i);
				
			}
			
		});
	}

}
